<!--
 * @Description: 
 * @Author: charles
 * @Date: 2021-05-05 22:02:56
 * @LastEditors: charles
 * @LastEditTime: 2021-07-14 15:19:22
-->
<template>
  <div ref="root" style="height: 95%"></div>
</template>

<script>
// 引入g2plot
// 对象的解构
import { Column } from "@antv/g2plot";
import { ref, onMounted } from "vue";
export default {
  setup() {
    // 获取到容器
    const root = ref(null);
    // 将实例化对象的函数封装起来
    let initChart = () => {
      const data = [

      ];
      // 实例化一个Colunm对象
      const column = new Column(root.value, {
      
      });
      // 渲染
      column.render();
    };
    onMounted(initChart);
    return {
      root,
    };
  },
};
</script>